home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / Finder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  6.5 KB  |  217 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        Finder.h
  3.  
  4.      Contains:    Finder flags and container types.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __FINDER__
  19. #define __FINDER__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __EVENTS__
  28. #include <Events.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     kCustomIconResource            = -16455                        /* Custom icon family resource ID */
  56. };
  57.  
  58.  
  59. enum {
  60.     kContainerFolderAliasType    = FOUR_CHAR_CODE('fdrp'),        /* type for folder aliases */
  61.     kContainerTrashAliasType    = FOUR_CHAR_CODE('trsh'),        /* type for trash folder aliases */
  62.     kContainerHardDiskAliasType    = FOUR_CHAR_CODE('hdsk'),        /* type for hard disk aliases */
  63.     kContainerFloppyAliasType    = FOUR_CHAR_CODE('flpy'),        /* type for floppy aliases */
  64.     kContainerServerAliasType    = FOUR_CHAR_CODE('srvr'),        /* type for server aliases */
  65.     kApplicationAliasType        = FOUR_CHAR_CODE('adrp'),        /* type for application aliases */
  66.     kContainerAliasType            = FOUR_CHAR_CODE('drop'),        /* type for all other containers */
  67.                                                                 /* types for Special folder aliases */
  68.     kSystemFolderAliasType        = FOUR_CHAR_CODE('fasy'),
  69.     kAppleMenuFolderAliasType    = FOUR_CHAR_CODE('faam'),
  70.     kStartupFolderAliasType        = FOUR_CHAR_CODE('fast'),
  71.     kPrintMonitorDocsFolderAliasType = FOUR_CHAR_CODE('fapn'),
  72.     kPreferencesFolderAliasType    = FOUR_CHAR_CODE('fapf'),
  73.     kControlPanelFolderAliasType = FOUR_CHAR_CODE('fact'),
  74.     kExtensionFolderAliasType    = FOUR_CHAR_CODE('faex'),        /* types for AppleShare folder aliases */
  75.     kExportedFolderAliasType    = FOUR_CHAR_CODE('faet'),
  76.     kDropFolderAliasType        = FOUR_CHAR_CODE('fadr'),
  77.     kSharedFolderAliasType        = FOUR_CHAR_CODE('fash'),
  78.     kMountedFolderAliasType        = FOUR_CHAR_CODE('famn')
  79. };
  80.  
  81.  
  82. enum {
  83.                                                                 /* Finder Flags */
  84.     kIsOnDesk                    = 0x0001,
  85.     kColor                        = 0x000E,
  86.     kIsShared                    = 0x0040,                        /* bit 0x0080 is hasNoINITS */
  87.     kHasBeenInited                = 0x0100,                        /* bit 0x0200 was the letter bit for AOCE, but is now reserved for future use */
  88.     kHasCustomIcon                = 0x0400,
  89.     kIsStationery                = 0x0800,
  90.     kNameLocked                    = 0x1000,
  91.     kHasBundle                    = 0x2000,
  92.     kIsInvisible                = 0x4000,
  93.     kIsAlias                    = 0x8000
  94. };
  95.  
  96. #if OLDROUTINENAMES
  97.  
  98. enum {
  99.     kIsStationary                = kIsStationery
  100. };
  101.  
  102. #endif  /* OLDROUTINENAMES */
  103.  
  104. /*    
  105.     The following declerations used to be in Files.≈, 
  106.     but are Finder specific and were moved here.
  107. */
  108.  
  109. enum {
  110.                                                                 /* Finder Constants */
  111.     fOnDesk                        = 1,
  112.     fHasBundle                    = 8192,
  113.     fTrash                        = -3,
  114.     fDesktop                    = -2,
  115.     fDisk                        = 0
  116. };
  117.  
  118.  
  119. struct FInfo {
  120.     OSType                             fdType;                        /*the type of the file*/
  121.     OSType                             fdCreator;                    /*file's creator*/
  122.     unsigned short                     fdFlags;                    /*flags ex. hasbundle,invisible,locked, etc.*/
  123.     Point                             fdLocation;                    /*file's location in folder*/
  124.     short                             fdFldr;                        /*folder containing file*/
  125. };
  126. typedef struct FInfo                    FInfo;
  127.  
  128. struct FXInfo {
  129.     short                             fdIconID;                    /*Icon ID*/
  130.     short                             fdUnused[3];                /*unused but reserved 6 bytes*/
  131.     SInt8                             fdScript;                    /*Script flag and number*/
  132.     SInt8                             fdXFlags;                    /*More flag bits*/
  133.     short                             fdComment;                    /*Comment ID*/
  134.     long                             fdPutAway;                    /*Home Dir ID*/
  135. };
  136. typedef struct FXInfo                    FXInfo;
  137.  
  138. struct DInfo {
  139.     Rect                             frRect;                        /*folder rect*/
  140.     unsigned short                     frFlags;                    /*Flags*/
  141.     Point                             frLocation;                    /*folder location*/
  142.     short                             frView;                        /*folder view*/
  143. };
  144. typedef struct DInfo                    DInfo;
  145.  
  146. struct DXInfo {
  147.     Point                             frScroll;                    /*scroll position*/
  148.     long                             frOpenChain;                /*DirID chain of open folders*/
  149.     SInt8                             frScript;                    /*Script flag and number*/
  150.     SInt8                             frXFlags;                    /*More flag bits*/
  151.     short                             frComment;                    /*comment*/
  152.     long                             frPutAway;                    /*DirID*/
  153. };
  154. typedef struct DXInfo                    DXInfo;
  155.  
  156. /* Values of the 'message' parameter to a Control Panel 'cdev' */
  157.  
  158. enum {
  159.     initDev                        = 0,                            /*Time for cdev to initialize itself*/
  160.     hitDev                        = 1,                            /*Hit on one of my items*/
  161.     closeDev                    = 2,                            /*Close yourself*/
  162.     nulDev                        = 3,                            /*Null event*/
  163.     updateDev                    = 4,                            /*Update event*/
  164.     activDev                    = 5,                            /*Activate event*/
  165.     deactivDev                    = 6,                            /*Deactivate event*/
  166.     keyEvtDev                    = 7,                            /*Key down/auto key*/
  167.     macDev                        = 8,                            /*Decide whether or not to show up*/
  168.     undoDev                        = 9,
  169.     cutDev                        = 10,
  170.     copyDev                        = 11,
  171.     pasteDev                    = 12,
  172.     clearDev                    = 13,
  173.     cursorDev                    = 14
  174. };
  175.  
  176.  
  177. /* Special values a Control Panel 'cdev' can return */
  178.  
  179. enum {
  180.     cdevGenErr                    = -1,                            /*General error; gray cdev w/o alert*/
  181.     cdevMemErr                    = 0,                            /*Memory shortfall; alert user please*/
  182.     cdevResErr                    = 1,                            /*Couldn't get a needed resource; alert*/
  183.     cdevUnset                    = 3                                /* cdevValue is initialized to this*/
  184. };
  185.  
  186. /* Control Panel Default Proc */
  187. typedef CALLBACK_API( long , ControlPanelDefProcPtr )(short message, short item, short numItems, short cPanelID, EventRecord *theEvent, long cdevValue, DialogPtr cpDialog);
  188. typedef STACK_UPP_TYPE(ControlPanelDefProcPtr)                     ControlPanelDefUPP;
  189. enum { uppControlPanelDefProcInfo = 0x000FEAB0 };                 /* pascal 4_bytes Func(2_bytes, 2_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  190. #define NewControlPanelDefProc(userRoutine)                     (ControlPanelDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlPanelDefProcInfo, GetCurrentArchitecture())
  191. #define CallControlPanelDefProc(userRoutine, message, item, numItems, cPanelID, theEvent, cdevValue, cpDialog)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppControlPanelDefProcInfo, (message), (item), (numItems), (cPanelID), (theEvent), (cdevValue), (cpDialog))
  192.  
  193.  
  194.  
  195.  
  196.  
  197. #if PRAGMA_STRUCT_ALIGN
  198.     #pragma options align=reset
  199. #elif PRAGMA_STRUCT_PACKPUSH
  200.     #pragma pack(pop)
  201. #elif PRAGMA_STRUCT_PACK
  202.     #pragma pack()
  203. #endif
  204.  
  205. #ifdef PRAGMA_IMPORT_OFF
  206. #pragma import off
  207. #elif PRAGMA_IMPORT
  208. #pragma import reset
  209. #endif
  210.  
  211. #ifdef __cplusplus
  212. }
  213. #endif
  214.  
  215. #endif /* __FINDER__ */
  216.  
  217.